import { native, QvogHint } from 'qvog-dsl';
import { Value, BinaryOperator } from 'qvog-types';

export default native<QvogHint>({ name: '@test/when' })()
    .match((node: Value): node is Value => {
        return node.stream().any(s => s instanceof BinaryOperator);
    })
    .when((_) => {
        return false;
    })
    .report({ message: 'match binary operator' });